/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ucab.desarrollo.viajesbook.actions;

/**
 *
 * @author isak
 */

import com.opensymphony.xwork2.ActionSupport;
import java.util.ArrayList;
import java.util.List;
import ucab.desarrollo.viajesbook.AppContext;
import ucab.desarrollo.viajesbook.negocio.IViajeBO;
import ucab.desarrollo.viajesbook.negocio.ViajeBO;


/**
 *
 * @author isak
 */
public class ViajeAutoCompleterCiudadAction extends ActionSupport
{

    private String select;
    private String selectKey;
    private List options = new ArrayList();
    private static final long serialVersionUID = -8481638176160014396L;

    @Override
    public String execute() throws Exception
    {
      
         IViajeBO negocio = (ViajeBO)AppContext.getApplicationContext().getBean("viajeBO");
         setOptions(negocio.obtenerListaDeCiudadesPorPais(selectKey)) ;
         return SUCCESS;
    }

    public String getSelect() {
        return select;
    }

    public void setSelect(String select) {
        this.select = select;
    }

    public List getOptions() {
        return options;
    }

    /**
     * @return the selectKey
     */
    public String getSelectKey() {
        return selectKey;
    }

    /**
     * @param selectKey the selectKey to set
     */
    public void setSelectKey(String selectKey) {
        this.selectKey = selectKey;
    }

    /**
     * @param options the options to set
     */
    public void setOptions(List options) {
        this.options = options;
    }



}


